home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / langs / iconv8_l.arc / IDOL.ARC / MPW.ICN < prev    next >
Encoding:
Text File  |  1990-03-19  |  1.6 KB  |  74 lines

  1. #
  2. # @(#)mpw.icn    1.2 3/13/90
  3. # OS-specific code for Macintosh MPW
  4. # Adapted from unix.icn by Charles Lakos
  5. #
  6. global lnkopt,env,sysok
  7.  
  8. procedure mysystem(s)
  9.   if \loud then write(s)
  10.   return system(s)
  11. end
  12.  
  13. procedure filename(s)
  14.   return s
  15. end
  16. procedure writesublink(s)
  17.   writelink(env||"_"||s)
  18. end
  19. procedure envpath(filename)
  20.   return env||"_"||filename
  21. end
  22. #
  23. # Installation.
  24. # Uses hierarchical filesystem on some systems (see initialize)
  25. #
  26. procedure install(args)
  27.   write("Installing idol environment with prefix ",env)
  28.   fout := envopen("i_object.icn","w")
  29.   write(fout,"record idol_object(__state,__methods)")
  30.   close(fout)
  31.   fout := &null
  32.   cdicont(["i_object"])
  33. end
  34.  
  35. procedure makeexe(args,i)
  36.   exe := args[i]
  37.   if icont(lnkopt||exe) = \sysok then {
  38.       mysystem("delete "||exe||".icn")
  39.       if \exec then {
  40.     write("Executing:")
  41.     every i := exec+1 to *args do exe ||:= " "||args[i]
  42.     mysystem(exe)
  43.       }
  44.   }
  45. end
  46. #
  47. # system-dependent compilation of idolfile.icn
  48. #   (in the idol subdirectory, if there is one)
  49. #
  50. procedure cdicont(idolfiles)
  51.   args := " -c"
  52.   rms  := ""
  53.   every ifile := !idolfiles do args ||:= " " || envpath(ifile)
  54.   every ifile := !idolfiles do rms  ||:= " " || envpath(ifile) || ".icn"
  55.  
  56.   if comp = -2 then return  # -t --> don't translate at all
  57.   if icont(args,"") = \sysok
  58.   then mysystem("delete "||rms)
  59. end
  60. procedure sysinitialize()
  61.   lnkopt := " -Sr500 -SF30 -Si1000 "
  62.   env:= "C"
  63.   sysok := 0
  64.   loud := &null
  65.   write(&errout)
  66.   write(&errout, "*** Select and run the following commands ***")
  67.   write(&errout)
  68. end
  69.  
  70. procedure system(s)
  71.   write(&errout,s)
  72.   return sysok
  73. end
  74.